import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CardWrap extends StatelessWidget {
  final Widget child;

  final double? height;

  final EdgeInsets? margin;

  final EdgeInsets? padding;

  const CardWrap(
      {required this.child, this.height, this.padding, this.margin, super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: height,
      padding: padding,
      margin: margin ?? EdgeInsets.fromLTRB(12.w, 12, 12.w, 0),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(8),
        color: Colors.white,
      ),
      child: child,
    );
  }
}
